import CommonApi from './common'

class DictionaryApi extends CommonApi {
    constructor() {
        const scope = '/dict'
        super(scope)
    }
    getList(data) {
        const path = this.resolvePath('/listAll')
        return this.post(path, data)
    }

    getSubList(data) {
        const path = this.resolvePath('/subDictList')
        return this.post(path, data)
    }
    // 获取已经启用的所有字典子项
    getTypes(data) {
        const path = this.resolvePath('/enableChildList')
        return this.post(path, data)
    }
    // 设置启用禁用
    setStatus(data) {
        const path = this.resolvePath('/enble')
        return this.post(path, data)
    }
}

export default DictionaryApi
